package freemarker.apiConfig;

import java.util.HashMap;
import java.util.Map;

/**
 * @description:
 * @author: 张德长 dechang.zhang@ucarinc.com
 * @date: 14:19:42 2018/11/9
 * @version:2.0
 */
public class ApiConfig implements Config {
    public static String classPath = "";
    public String SERVER = "";
    public String SERVER_CONST = "";
    public String SERVER_NAME = "";
    public String SERVER_DESC = "";
    public String REQUEST_URL = "";

    public ApiConfig(String SERVER, String SERVER_CONST, String SERVER_NAME, String SERVER_DESC, String REQUEST_URL) {
        this.SERVER = SERVER;
        this.SERVER_CONST = SERVER_CONST;
        this.SERVER_NAME = SERVER_NAME;
        this.SERVER_DESC = SERVER_DESC;
        this.REQUEST_URL = REQUEST_URL;
    }

    @Override
    public Map<String, Object> setModuleConfig() {
        Map<String, Object> dataMap = new HashMap<String, Object>();
        dataMap.put("classPath", classPath);
        dataMap.put("server", SERVER);
        dataMap.put("className", SERVER_NAME);//SERVER_NAME +具体类名
        dataMap.put("requestUrl", REQUEST_URL);
        dataMap.put("serviceId", SERVER_NAME + "ServiceCom");////SERVER_NAME +具体类名
        dataMap.put("serviceDesc", SERVER_DESC);
        dataMap.put("serverConst", SERVER_CONST);
        return dataMap;
    }
}
